From: Benjamin Otte Date: Thu, 18 Nov 2021 06:54:16 +0000 (+0100) Subject: label: Don't add a pixel where none should be added X-Git-Tag: archive/raspbian/4.6.5+ds-1+rpi1~1^2~91^2^2~133^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=899cb445199c45733882f5977468bebfbe33a070;p=gtk4.git label: Don't add a pixel where none should be added When the text width is larger than the measuring width, set the min width to that value, don't also add 1 to it. --- diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 41041b3a9e..11ebad9c2d 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -1201,7 +1201,7 @@ get_width_for_height (GtkLabel *self, text_width = PANGO_PIXELS_CEIL (text_width); if (text_width > mid) min = mid = text_width; - if (text_height > height) + else if (text_height > height) min = mid + 1; else max = mid;